<template lang="html">
    <el-form :model="ruleForm" label-width="100px" class="demo-ruleForm" >
      <el-form-item label="名称" prop="name">
        <el-input type="text" v-model="ruleForm.name" auto-complete="off"></el-input>
      </el-form-item>
      <el-form-item label="orderNum" prop="orderNum">
        <el-input type="number" v-model="ruleForm.orderNum" auto-complete="off"></el-input>
      </el-form-item>
      <el-form-item label="url" prop="url">
        <el-input type="text" v-model="ruleForm.url" auto-complete="off"></el-input>
      </el-form-item>
      <el-form-item label="pid" prop="pid">
        <select-group :newValue="newValue" :options="options" @select="select"></select-group>
      </el-form-item>
      <el-form-item label="状态" prop="status">
        <el-radio-group v-model="ruleForm.status">
          <el-radio label="1">启用</el-radio>
          <el-radio label="0">禁用</el-radio>
        </el-radio-group>
      </el-form-item>
      <slot></slot>
    </el-form>
</template>

<script>
import SelectGroup from 'backendIndex/selectGroup/selectGroup'

export default {
  props: {
    ruleForm: {
      type: Object,
      default: ''
    },
    options: {
      type: Array,
      default: []
    },
    newValue: {
      type: [String, Number],
      default: ''
    }
  },
  methods: {
    select(value) {
      this.$emit('select', value)
    }
  },
  components: {
    SelectGroup
  }
}
</script>

<style lang="css">
</style>
